/*
ID:luongho3
LANG:JAVA
TASK:subset
 */
import java.io.File;
import java.io.PrintStream;
import java.util.Scanner;


public class subset {

	public static int MAX_N = 50;
	public static int MAX = 2500;
	public static int N;
	
	public static void main(String[] args) throws Exception {
		Scanner scanner = new Scanner(new File("subset.in"));
		PrintStream ps = new PrintStream(new File("subset.out"));
		System.setOut(ps);
		
		N = scanner.nextInt();
//		for (N=1;N<=39;++N) {
		if (N % 4 != 0 && (N+1) % 4 != 0) {
			System.out.println(0);
		}
		else {
			int sum = (N + 1) * N / 2;
			int midsum = sum / 2;
			long[][] table = new long[50][2500];
			for (int i=1;i<=N;++i) {
				table[i][0] = 1;
				table[i][1] = 1;
			}
			for (int j=2;j<=midsum;++j) {
				table[1][j] = 0;
			}
			for (int i=2;i<=N;++i) {
				for (int j=2;j<=midsum;++j) {
					if (i>j) {
						table[i][j] = table[i-1][j];
					}
					else {
						table[i][j] = table[i-1][j] + table[i-1][j-i];
					}
				}
			}
			System.out.println(table[N][midsum] / 2);
		}
//		}
		ps.close();
	}
	
}
